package com.example.ResumeWorkPlatform.rest;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.example.ResumeWorkPlatform.dao.GerdenDao;
import com.example.ResumeWorkPlatform.dao.GerdenEntity;

import java.util.List;

/**
 * 
 * @ClassName: GerdenRest
 * @Description: 
 * @Author :chengwenixng
 * @Copyright: Smartlab411
 * @DateTime 2021-04-29 17:10:52
 */
@RestController
@RequestMapping("web/rest/industrialPark/")
public class GerdenRest {
	//创建日志
	private static final Logger log = LoggerFactory.getLogger(GerdenRest.class);
	@Autowired
	GerdenDao gerdenDao;
		
	/**
	 * @Title: addGerden
	 * @Description: 
	 * @Author coding
	 * @DateTime 2021-04-29 17:13:13
	 */
	public void addGerden() {
		List<GerdenEntity> gerdenList = gerdenDao.findByDelFlag(true);
		   if(gerdenList.size() == 0) {
			   for(int i = 1 ; i <= 3 ; i++) {
					GerdenEntity gerdenEntities = new GerdenEntity();
					gerdenEntities.setGerdenName("园区"+i); 
					gerdenDao.save(gerdenEntities);
			    }
		   }
	}

		
}

		 
			
	

